package cn.usbtg.sutil.filescanner;

/**
 * jar文件里面的file信息
 */
public class File {
    private String packageName; //包名
    private String name;//文件名

    public File(String packageName, String name) {
        this.packageName = packageName;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPackageName() {
        return packageName;
    }

    public void setPackageName(String packageName) {
        this.packageName = packageName;
    }

    public String getPath() {
        return this.packageName + this.name;
    }

    public String getClassName() {
        return this.getPath().replaceAll("/", ".").replaceAll(".class", "");
    }

    @Override
    public String toString() {
        return this.packageName + this.name;
    }
}